package kadledav.adventure.framework.controll.commands.abstr;

import java.io.PrintStream;
import java.util.List;
import java.util.Scanner;

import kadledav.adventure.framework.model.general.Description;
import kadledav.adventure.framework.model.world.Player;

public abstract class PrintDescriptionCommnad extends CommandAbstract {

	public PrintDescriptionCommnad(PrintStream out, Scanner in, Player player) {
		super(out, in, player);
	}
	
	protected boolean printDescribableObject(List<? extends Description> actionObjects,String descriptionObjectPrefix ,String title){
		if(actionObjects.isEmpty())return false;
		out.println(title);
		for (int i = 0; i < actionObjects.size(); i++) {
			Description object = actionObjects.get(i);
			out.println(" "+descriptionObjectPrefix+i+" : "+object.getFullInfo());
		}
		return true;
	}

}
